<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//Route::middleware('auth:api')->get('/user', function (Request $request) {
//    return $request->user();
//});

/**
 * H5端接口
 */
Route::group(['namespace' => 'AppApi'], function () {
    include 'apiRoutes/app/company.php';  //公司相关
    include 'apiRoutes/app/news.php';  //咨询相关
    include 'apiRoutes/app/home.php';  //首页
    include 'apiRoutes/app/message.php';  //消息
    include_once('apiRoutes/app/login.php');  //登录
    include_once('apiRoutes/app/test.php');  //测试
    include_once('apiRoutes/app/my.php');  //我的
    include_once('apiRoutes/app/order.php');  //订单
    include_once('apiRoutes/app/pay.php');  //支付


    Route::any('app/call/{c}','Home\ApiControler@index');
});


/**
 * PC端接口
 */
Route::group(['prefix' => 'web','namespace' => 'WebApi'], function () {
    include_once('apiRoutes/web/home.php');  //首页
    include_once('apiRoutes/web/user.php');

    include_once('apiRoutes/web/userCenter.php'); // 用户中心
    include_once ('apiRoutes/web/common.php');//注册页路由，
});

